]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell: Drop XDND initialization code
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 3 Jul 2019 14:28:00 +0000 (16:28 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 3 Jul 2019 14:37:15 +0000 (16:37 +0200)
Let mutter take over this, and drop this piece of backend-specific
code.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/611

js/ui/xdndHandler.js
src/shell-global.c
src/shell-global.h

index 86c75975dc504009ee489fe6791f6f6eec445b5e..9749b81bf1b9c0093eb82749374c4baaadbb3952 100644 (file)
@@ -17,9 +17,6 @@ var XdndHandler = class {
         Main.uiGroup.add_actor(this._dummy);
         this._dummy.hide();
 
-        if (!Meta.is_wayland_compositor())
-            global.init_xdnd();
-
         var dnd = Meta.get_backend().get_dnd();
         dnd.connect('dnd-enter', this._onEnter.bind(this));
         dnd.connect('dnd-position-change', this._onPositionChanged.bind(this));
index 28a1ccb2e21c38e011e5107792ffb9d15952cdbc..d8fd8046b503cb6810402aa65e3c0926139370eb 100644 (file)
@@ -51,7 +51,6 @@ struct _ShellGlobal {
   GObject parent;
 
   ClutterStage *stage;
-  Window stage_xwindow;
 
   MetaDisplay *meta_display;
   MetaWorkspaceManager *workspace_manager;
@@ -852,15 +851,10 @@ _shell_global_set_plugin (ShellGlobal *global,
 
   global->stage = CLUTTER_STAGE (meta_get_stage_for_display (display));
 
-  if (meta_is_wayland_compositor ())
-    {
-      global->stage_xwindow = None;
-    }
-  else
+  if (!meta_is_wayland_compositor ())
     {
       MetaX11Display *x11_display = meta_display_get_x11_display (display);
       global->xdisplay = meta_x11_display_get_xdisplay (x11_display);
-      global->stage_xwindow = clutter_x11_get_stage_window (global->stage);
     }
 
   st_entry_set_cursor_func (entry_cursor_func, global);
@@ -1184,34 +1178,6 @@ shell_global_notify_error (ShellGlobal  *global,
   g_signal_emit_by_name (global, "notify-error", msg, details);
 }
 
-/**
- * shell_global_init_xdnd:
- * @global: the #ShellGlobal
- *
- * Enables tracking of Xdnd events
- */
-void shell_global_init_xdnd (ShellGlobal *global)
-{
-  Window output_window = meta_get_overlay_window (global->meta_display);
-  long xdnd_version = 5;
-
-  XChangeProperty (global->xdisplay, global->stage_xwindow,
-                   gdk_x11_get_xatom_by_name ("XdndAware"), XA_ATOM,
-                   32, PropModeReplace, (const unsigned char *)&xdnd_version, 1);
-
-  XChangeProperty (global->xdisplay, output_window,
-                   gdk_x11_get_xatom_by_name ("XdndProxy"), XA_WINDOW,
-                   32, PropModeReplace, (const unsigned char *)&global->stage_xwindow, 1);
-
-  /*
-   * XdndProxy is additionally set on the proxy window as verification that the
-   * XdndProxy property on the target window isn't a left-over
-   */
-  XChangeProperty (global->xdisplay, global->stage_xwindow,
-                   gdk_x11_get_xatom_by_name ("XdndProxy"), XA_WINDOW,
-                   32, PropModeReplace, (const unsigned char *)&global->stage_xwindow, 1);
-}
-
 /**
  * shell_global_get_pointer:
  * @global: the #ShellGlobal
index 67556263b4c81748782da531ede269aa08de2787..ad67c72c07793f3d4f72db1b79967886fdca78e3 100644 (file)
@@ -75,8 +75,6 @@ void     shell_global_notify_error              (ShellGlobal  *global,
                                                  const char   *msg,
                                                  const char   *details);
 
-void     shell_global_init_xdnd                 (ShellGlobal  *global);
-
 void     shell_global_reexec_self               (ShellGlobal  *global);
 
 const char *     shell_global_get_session_mode  (ShellGlobal  *global);